﻿namespace Vestras.StarCraft2.Luna.Validation {
    public static class TypeValidatorRegisterer {
        static bool initialized;

        static void _Register() {
            ValidationEntryPoint.RegisterTypeValidator(new BreakStatementTypeValidator());
            ValidationEntryPoint.RegisterTypeValidator(new ContinueStatementTypeValidator());
            ValidationEntryPoint.RegisterTypeValidator(new ElseStatementTypeValidator());
            ValidationEntryPoint.RegisterTypeValidator(new FunctionLevelExpressionTypeValidator());
            ValidationEntryPoint.RegisterTypeValidator(new FunctionTypeValidator());
            ValidationEntryPoint.RegisterTypeValidator(new IfStatementTypeValidator());
            ValidationEntryPoint.RegisterTypeValidator(new IncludeTypeValidator());
            ValidationEntryPoint.RegisterTypeValidator(new ReturnStatementTypeValidator());
            ValidationEntryPoint.RegisterTypeValidator(new StructTypeValidator());
            ValidationEntryPoint.RegisterTypeValidator(new TypedefTypeValidator());
            ValidationEntryPoint.RegisterTypeValidator(new VariableTypeValidator());
            ValidationEntryPoint.RegisterTypeValidator(new WhileStatementTypeValidator());
        }

        public static void Register() {
            if (!initialized) {
                _Register();
                initialized = true;
            }
        }
    }
}
